package com.mgwt.phaseone.server;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.mgwt.phaseone.client.RPCService;

/**
 * The server side implementation of the RPC service.
 */
@SuppressWarnings("serial")
public class RPCServiceImpl extends RemoteServiceServlet implements
		RPCService {

	public String greetServer(String input) throws IllegalArgumentException {
		
		return input;

	}
	
    /**
     * get the books of the bible and info in an object array
     * This is my favorite way to get recordset data
     * 
     * @return bibleData (array)
     */
    public boolean isValidUser(String username, String password) {
            
            DB_Church db = new DB_Church();
            return db.checkuser(username, password)>0;
            
    }
    
    
    
    
    /**
     * use RunMeTOTestQuery to test a query - its much easier to test
     */
    public void testQuery() {
            
            //setup the object
            DB_QueryStuff db = new DB_QueryStuff();
            //run my method
            db.queryMyDB();
            
    }
    

}
